<template>
  <!-- 对话框 -->
  <div>
    <el-dialog :title="dialogTitle" :visible="dialogVisible" width="30%" :before-close="handleClose">
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-form-item prop="holdingTime" label="时间">
          <el-date-picker size="mini"
            v-model="form.holdingTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="选择时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item prop="gold" label="品种">
          <el-radio-group v-model="form.gold" size="mini">
            <el-radio-button label="黄金" >黄金</el-radio-button>
            <el-radio-button label="白银">白银</el-radio-button>
          </el-radio-group>
        </el-form-item>
        
        <el-form-item prop="totalInventory" label="总库存(吨)">
          <el-input v-model="form.totalInventory" size="mini" placeholder="请输入总库存(吨)" />
        </el-form-item>
        <el-form-item prop="decreaseHoldings" label="增持/减持(吨)">
          <el-input v-model="form.decreaseHoldings" size="mini" placeholder="请输入增持/减持(吨)" />
        </el-form-item>
        <el-form-item prop="assetValue" label="资产净值(美元)">
          <el-input v-model="form.assetValue" size="mini" placeholder="请输入资产净值(美元)" />
        </el-form-item>
        <el-form-item>
          <el-row type="flex" justify="end" style="margin-top: 10px;">
            <el-button size="mini" @click="handleClose">取 消</el-button>
            <el-button size="mini" type="primary" @click="btnOK">确 定</el-button>
          </el-row>
        </el-form-item>
      </el-form>

    </el-dialog>

  </div>

</template>

<script>

export default {
  name: 'CftcAdd',
  props: {
    dialogVisible: {
      default: false,
      type: Boolean
    },
    dialogTitle:'',
    form:{},
    options:[],
    data:null
  },
  data() {
    return {
      rules:[],
    }
  },
  watch: {
    
  },
  mounted() {

  },

  methods: {
    // 取消
    handleClose() {
      this.$emit('update:dialogVisible', false)
    },

    // 确定
    async btnOK() {
      this.data.fn.submit();
    },
   
    Close() {
      this.showVisible = false
      this.handleClose()
    },
   
  }
}
</script>

<style lang="scss" scoped></style>
